Article reprinted from PHP using header+location to achieve website 301 Redirect | Lanzhou Fly Rain seo | Http://www.feiyuseo.com/seo-jishu/145.html
For our SEO staff, sometimes need to redirect the site. In general, HTTP return status codes for
Transferred from: http://www.feiyuseo.com/seo-jishu/145.htmlFor our SEO staff, sometimes need to redirect the site. In general, HTTP return status codes for site redirection are 301 and 3,022. the following Lanzhou SEO through an example to
Use the PHP program header location to jump to the attention of a detail!
As we all know, PHP website jumps three ways: JS, HTML META Refresh, PHP header ("Location: $url"). But here is a very small detail that can easily lead to errors.
Once made
As we all know, PHP site jump has three kinds of methods: JS, HTML META-Refresh, PHP header ("Location: $url"). But here's a very small detail that can easily lead to errors.
One time to make a jump program, the result ignores this, resulting in the
Regardless of how many headers the page has, it executes the last one, but conditionally, for example:
Header (' location:http://www.jb51.net ');
Header (' location:http://www.g.cn ');
Header (' location:http://www.baidu.com ');
This will jump to
Mobile browser to the header sometimes with position:fixed, useless, can only be used Position:absolute, instead, in view of this, encapsulated the following code with adapter specific and filtering:functionissupportfixed () {varUserAgent
Use the PHP program header location to jump to the attention of a detail!
As we all know, PHP website jumps three ways: JS, HTML META Refresh, PHP header ("Location: $url"). But here is a very small detail that can easily lead to errors.
Once made
Single Sign-On sends a link so that the following parameters do not go to the login page and directly go to the login background method and jump to the php Project's homepage. how should I perform this operation?
This is the background login
Send a link to the following parameters do not go to the landing page directly go to the background method of landing and then jump to the first page of the PHP project, how to operate
This is the backstage landing method,
function
The following describes how to use the header function. No matter how many headers are on the page, the function executes the last one, but it is conditional. For example: header (Location: www.jb51.net); header (Location: www.g.cn); header
HTTP header information
The function of the head information is many, the main one has the following several:
1. Jump
When the browser accepts the LOCATION:XXXX in the header message, it will automatically jump to the URL address that XXXX points to,
First, Caption-side properties
After the table joins the border, the default style is as follows:
What if we want to adjust the table title?
In CSS, we use the Caption-side property to define the position of the table header.
Grammar:
Caption-side:
function Header function:
Page Jump
HTTP header informationHeader information has many functions, the most important of which are the following:1, jumpWhen the browser accepts the location:xxxx in the header, it automatically jumps to the URL
Use the PHPheader () function in detail (error settings such as 301 and 404 ). If you have just started learning PHP, there may be many functions that need to be studied. today we will learn how to use PHPHeader (). for more instructions, please
Use the PHPheader () function to implement the 404 error prompt function on the page. we have compiled the detailed usage of the PHPheader () function and shared it with you. we need to provide more support for our 404 page.
If you have just started
What is the problem with this php file? How to enable PHP to automatically jump to this value link after writing data to the database
Defined ('pcpay _ path') or exit; class record_control extends admin_control {public function add () {$ uid = $
Using the PHPheader () function to implement the 404 error prompt function on the page, we have sorted out the detailed usage of the PHPheader () function and shared it with you. We need a lot of support. If you are just learning PHP, many functions
Usage of the PHPheader () function (incorrect settings such as 301 and 404)
Header ("HTTP/1.1 404 Not Found ");
For the ErrorDocument 404/404. php function in apache configuration
Error_page 404/404
PHPheader () function description (301, 404, and other error settings ). If you have just started learning PHP, there may be many functions that need to be studied. today we will learn how to use PHPHeader (). for more instructions, please refer to
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.